﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace Imagenator
{
	class UpdateInfo : ArgusLib.Xml.UpdateInfo
	{
		public UpdateInfo()
			:base()
		{
		}

		protected override string GetXmlRootName()
		{
			return "ImagenatorUpdate";
		}

		protected override string GetDownloadSource()
		{
			if (ServerInfo.UpdateInfoAdress != null)
				return ServerInfo.UpdateInfoAdress.AbsoluteUri;
			return "http://argusmagnus.dx.am/appinfo/Imagenator.xml";
			//return "https://dl.dropboxusercontent.com/u/104710622/Updates/Imagenator.xml";
		}

		public static void DownloadAsync(Action<UpdateInfo> callback)
		{
			UpdateInfo.DownloadAsync<UpdateInfo>(callback);
		}
	}
}
